#ifndef _edaDAGVertex_h_
#define _edaDAGVertex_h_

#include <vector>

using namespace std;

class edaDAGEdge;

class edaDAGVertex
{
  public:
    /**
     * Constructor
     */
    edaDAGVertex(int key);
    /**
     * Destructor
     */
    ~edaDAGVertex();
    /**
     * Get the key of the vertex
     */
    int getKey() const;
    /**
     * Insert the inbound edge
     */
    void insertInEdge(edaDAGEdge *inEdge);
    /**
     * Insert the outbound edge
     */
    void insertOutEdge(edaDAGEdge *outEdge);
    /**
     * Get the list of inbound edges
     */
    vector<edaDAGEdge *> *getInEdges();
    /**
     * Get the list of outbound edges
     */
    vector<edaDAGEdge *> *getOutEdges();
    /**
     * Check for cycle
     * \return true if there is a cycle
     */
    bool cycleCheck(int &cycleVertex);

  private:
    vector<edaDAGEdge *> inEdges;
    vector<edaDAGEdge *> outEdges;
    bool cycleCheckFlag;
    int vertexKey;
};

#endif
